﻿<?php
	if (isset($_POST["pseudo"])){
		$pseudo = $_POST["pseudo"];
		include "fonctions.php";
		db_connect();
		$req = "SELECT * FROM contributeurs WHERE pseudo = '$pseudo';";
		$res = mysql_query($req) or die (mysql_error());
		$nb = mysql_num_rows($res);
		
		if ($nb == 0)
		{
			echo "null";
		}
		else
		{
			$data = mysql_fetch_assoc($res);
			echo "pseudo:".$data['pseudo']."\n";
			echo "password:".$data['password']."\n";
			echo "nom:".$data['nom']."\n";
			echo "prenom:".$data['prenom']."\n";
			echo "date_naissance:".$data['date_naissance']."\n";
			echo "sexe:".$data['sexe']."\n";
			echo "etatUser:".$data['etatUser']."\n";
		}
	}
?>